#include "PCH.h"
#include "VertexDeclDX9.h"

bool Graphic::VertexDeclDX9::IsValid()
{
	return m_bIsValid;
}

int Graphic::VertexDeclDX9::GetHandle()
{
	return (int)m_pDecl;
}

void Graphic::VertexDeclDX9::Release()
{
	if(m_bIsValid)
	{
		m_bIsValid = false;
		m_pDecl->Release();
	}

	delete this;

}

int Graphic::VertexDeclDX9::GetSize()
{
	return m_nSize;
}

Graphic::VertexDeclDX9::VertexDeclDX9( D3D9VertexDecl* pDecl, int size)
	: m_pDecl(pDecl)
	, m_nSize(size)
	, m_bIsValid(true)
{

}
